<!doctype html>
<html>
<head>
    <title>{$INI['system']['sitename']}</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="/css/style.css">
    <link rel="stylesheet" href="/css/font-awesome.min-4.3.0.css">
	<script src="/js/jquery.min-2.1.3.js"></script>
</head>
<body>
    <div class="con">
        <div class="mt_order" id="groups">
		
			<div class="groups_line"></div>
			
			<!--{if $orders}-->
			<div id="order_list">
			<!--{loop $orders $index $one}-->	
			<div class="mt_g">
				<div class="mt_g_img">
					<a href="/account/group.php?id={$one['id']}">
						<img src="${team_image($teams[$one['team_id']]['image'])}">
					</a>
				</div>
				<div class="mt_g_info">
					<p class="mt_g_name">{$teams[$one['team_id']]['title']}</p>
					<p class="mt_g_price">成团价： <span> <b > ¥${moneyit($one['origin'])}</b>/件 </span><i></i > </p>
				</div>
			</div> 
			<div class = "mt_status" >
				<span class = "mt_status_txt" > {$one['pin_tip']} </span>
				
				<!--{if !empty($INI['system']['secsite']) }-->
				
				<a class = "mt_status_lk" href = "{$INI['system']['wwwprefix']}{$INI['system']['secsite']}account/group.php?id={$one['id']}" > 查看团详情 </a> 
				<!--{else}-->
				<a class = "mt_status_lk" href = "{$INI['system']['wwwprefix']}account/group.php?id={$one['id']}" > 查看团详情 </a> 
				<!--{/if}-->
		
				
			</div>
			<!--{/loop}-->	
			</div>
			<!--{else}-->
			<a href="/"><div class="mt_nogroups"><h4>您还没有参加过任何团购，赶快去首页火拼吧！</h4></div></a>
			<!--{/if}-->
        </div>
    </div>
	<div>
		 <div class="center" id="center_pullup" style="display:none;">
		 <span><img class="img_rotate" src="/images/pull_loading_8eba142.png"/>
		 </span><span class="orders_text"></span>
	</div>
		 
		 
    <div style="height:58px;visibility:hidden "></div>
    <!--{include footer}-->
	<script>
		var offset = 0;
		var _pa = 2;
		var is_can_next = 1;
		<!--{if !empty($INI['system']['secsite']) }-->
		var cur_url = "{$INI['system']['wwwprefix']}{$INI['system']['secsite']}account/groups.php";
		<!--{else}-->
		var cur_url = "/account/groups.php";
		<!--{/if}-->
		
		function loaddata()
		{ 
			totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());     //浏览器的高度加上滚动条的高度 

			if ($(document).height() <= totalheight+200)     //当文档的高度小于或者等于总的高度的时候，开始动态加载数据
			{ 
				if(is_can_next == 1)//加载数据
				{
					is_can_next = 0;
					nextpage();
				}
			} 
		} 
		
		function nextpage()
		{	
			var best_url = cur_url+'?page='+_pa;
			$('#center_pullup').show();
			$.ajax(
				{ 
					url: best_url, 
					dataType: 'json', 
					success: function(result){
						if(result.ret>0){
							if(_pa != 1)
							{
								$('#center_pullup').hide();
							}
							//$('.nextpage').hide();	
							return false;
						}
						if(result.offset == offset)
						{
							$('#center_pullup').hide();
							return false;
						} else {
							offset = result.offset;
						}
						$('#order_list').append(result.html);
						$('#center_pullup').hide();
						_pa++;
						is_can_next = 1;
					}
				}
			);
		}

		$(function(){
			
			$(window).scroll( function() { 
				loaddata();
			}); 
			
		})
		</script>
	
	
</body>
</html>


